package com.lizard.schedule.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 用于http request bean中的注解
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Request {

    public enum Method{GET, POST};

    /**
     * HTTP请求地址
     *
     * @return
     */
    public String url() default "";

    /**
     * HTTP请求地址(调试)
     *
     * @return
     */
    public String debugUrl() default "";

    /**
     * HTTP请求方法
     *
     * @return
     */
    public Method method() default Method.POST;

    /**
     * response对应的bean对象类型
     * @return
     */
    public Class responseClazz() default Object.class;

}
